import { defineComponent, h, ref } from 'vue'

export default defineComponent({
    props: {
        level: {
            type: Number,
            required: true
        }
    },
    setup(props, { slots }) {
        console.log(slots)
        const item = ref([
            {
                id: 1,
                text: '学习'
            },
            {
                id: 2,
                text: '吃饭'
            }
        ])
        const vnode = h('ul', item.value.map(i => h('li', { key: i.id }, i.text)))
        const vnode2 = <ul>{item.value.map(i => {
            return <li id={i.id} key={i.id}>{i.text}</li>
        })}</ul>
        return () => h('div', ['hello', h('div', slots.footer())])
    }
})